package EveryDayPractice;

public class Practice29 {
     public static void main(String[] args) {
       int[][] arr={{0,1,2},{3,4,5},{6,7,8}};
       int sum=0;
       for(int i=0;i<arr.length;i++){
           for(int j=0;j<arr[i].length;j++){
               {
                if(i==j){
                    sum+=arr[i][j];
                }
               }
           }
       }
       System.out.println(sum);
     }
}
